package com.rambo.androidnews.mvp.repository;

import com.haibin.retrofit.Retrofit;
import com.haibin.retrofit.call.Callback;
import com.haibin.retrofit.net.Form;
import com.haibin.retrofit.net.Path;
import com.rambo.baselib.httpapi.WanAdApiService;
import com.rambo.baselib.model.wanad.WanAdApiArticle;
import com.rambo.baselib.model.wanad.WanAdApiPage;
import com.rambo.baselib.model.wanad.WanAdApiResult;

import java.io.IOException;
import java.util.List;

/***********************************************************************
 * <p>@description:
 * <p>@author: rambo
 * <p>@version: 1.0.0
 * <p>@created on: 2022/1/14 10:42
 **********************************************************************/
public class WanAdRepository {
    public void getHomeArticle(Callback<WanAdApiResult<WanAdApiPage<List<WanAdApiArticle>>>> callbck, long curPage, long pageSize) {
        Retrofit.getDefualt().from(WanAdApiService.class)
                .getHomeArticle(curPage, pageSize).execute(callbck);
    }
    public void getWxArticle(Callback<WanAdApiResult<WanAdApiPage<List<WanAdApiArticle>>>> callbck, long curPage, long pageSize) {
        Retrofit.getDefualt().from(WanAdApiService.class)
                .getWxArticle(curPage, pageSize).execute(callbck);
    }
    public void getProject(Callback<WanAdApiResult<WanAdApiPage<List<WanAdApiArticle>>>> callbck, long curPage, long pageSize,int cid) {
        Retrofit.getDefualt().from(WanAdApiService.class)
                .getProject(curPage, pageSize,cid).execute(callbck);
    }
    public void getProjectCase(Callback<WanAdApiResult<List<WanAdApiArticle>>> callbck) {
        Retrofit.getDefualt().from(WanAdApiService.class)
                .getProjectCase().execute(callbck);
    }
}
